<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body background="images/modify.jpg">
</center>
<%
Connection con = null;
Statement st = null;
ResultSet rs =null;
try{
	Class.forName("com.mysql.jdbc.Driver");
	con = DriverManager.getConnection("jdbc:mysql://localhost:3306/1","root","lishanshan");
	st = con.createStatement();
	int id=(Integer.parseInt(request.getParameter("id")));
	rs = st.executeQuery("select * from person where id ='"+id+"'");
%>
<a href="infor.jsp">预案信息</a>
<br/>
<br/>
<table border="1" width="100%" cellpadding ="2" cellspacing="1">
<tr>
<td width="5%">预案名称</td>
<td width="5%">适用人员</td>
<td width="5%">发布时间</td>
<td width="80%">预案内容</td>
<td width="5%">操作</td>
</tr>
<%
while(rs.next()){
	String name = rs.getString("name");
	String identity = rs.getString("identity");
	Date birthday = rs.getDate("birthday");
	String descriptions = rs.getString("descriptions");
	out.println("<tr>");
	%>
	<% 
	out.println("<td>"+name+"</td>");
	
	out.println("<td>"+identity+"</td>");
	out.println("<td>"+birthday+"</td>");
	out.println("<td>"+descriptions+"</td>");
	out.println("<td><a href=\"modify.jsp?id="+id+
			"\">修改</a>&nbsp;&nbsp;");
out.println("</tr>");
}
%>
</table>
<%
}catch(SQLException e){
	e.printStackTrace();
}finally{
	try{
		rs.close();
		st.close();
		con.close();
	}catch (SQLException e){
		e.printStackTrace();
	}
}%>
</body>
</html>